package com.bwf.dt;

/**
 * @Version v1.0
 * @Description: TODO
 * @Author ZHANZHONGXIN
 * @Date 2022/5/10 15:04
 * @Copyright 博为峰
 */
public class Test {
    public static void main(String[] args) {
        Programmer programmer1 = new Programmer();
//        programmer1.work();
//        programmer1.coding();
        Employee programmer2 = new Programmer();//向上转型
        Programmer programmer3 = (Programmer) programmer2;//向下转型（强制类型转换）
        programmer2.work();
//        programmer2.coding();
        programmer3.coding();

        /*
           多态：父类型指向子类对象
         */
    }
}
